<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数对this的影响2</title>
</head>
<body>
    <button>xiasnn</button>
    <script>
        let hd = {
            site : "要爱自己",
            handleEvent : function(event){
                console.log(`${event.target.innerHTML}${this.site}`)
            },
            bind : function(){
                let button = document.querySelector('button');

                button.addEventListener("click",this);  //这边的this指的就是handleEvent方法
            }
        };
        hd.bind();
    </script>
</body>
</html>